<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">

<title>NEWS-1.9.1 - RDoc Documentation</title>


<script src="../js/navigation.js" defer></script>
<script src="../js/search.js" defer></script>
<script src="../js/search_index.js" defer></script>
<script src="../js/searcher.js" defer></script>
<script src="../js/darkfish.js" defer></script>

<script src="../js/jquery-3.2.0.min.js"></script>

<script src="../js/vue.min.js"></script>
<script src="../js/js.cookie.min.js"></script>

<link href="../css/fonts.css" rel="stylesheet">
<link id='rdoccss' href="../css/rdoc.css" rel="stylesheet">
<link href="../css/carbon17.css" rel="stylesheet">

<script type="text/javascript">
  var rdoc_rel_prefix = "../";
  var index_rel_prefix = "../";
  var darkModeCsseHref = "../css/rdoc-dm.css"
  var defaultModeCssHref = "../css/rdoc.css"
  // var cssDarkmode = Cookies.get('darkmode');
  
  if( Cookies.get("darkmode") == "true") {
	$('#rdoccss').attr("href", darkModeCsseHref);
}

//  https://cssdeck.com/blog/simple-jquery-stylesheet-switcher/

document.write('<style type="text/css">body{display:none}</style>');

</script>


</head>
<body id="top" role="document" class="file">
  <!-- this is page.html -->
  <div id='actionbar' >
    <div class='wrapper mdiv'>
      <ul class='grids g0'></ul>
    </div> 
    <!-- VERSION HEADER for 3.3.0-preview2 NOT FOUND -->
  </div> <!-- end action bar -->


 <div class='wrapper hdiv'>

 


<nav id='vapp' role="navigation">
  <div id="project-navigation">
    <div id="home-section" role="region" title="Quick navigation" class="nav-section">
  <h2><a href="../index.html" rel="home">Home</a></h2>

  <div id="table-of-contents-navigation"  >
    <a href="../table_of_contents.html#pages">Pages</a>
    <a href="../table_of_contents.html#classes">Classes</a>
    <a href="../table_of_contents.html#methods">Methods</a>
  </div>
</div>

    <div id="search-section" role="search" class="project-section initially-hidden">
  <form action="#" method="get" accept-charset="utf-8">
    <div id="search-field-wrapper">
      <input id="search-field" role="combobox" aria-label="Search"
             aria-autocomplete="list" aria-controls="search-results"
             type="text" name="search" placeholder="Search" spellcheck="false"
             title="Type to search, Up and Down to navigate, Enter to load">
    </div>

    <ul id="search-results" aria-label="Search Results"
        aria-busy="false" aria-expanded="false"
        aria-atomic="false" class="initially-hidden"></ul>
  </form>
</div>

  </div>

  
<div class="nav-section">
  <h3>Table of Contents</h3>

  <ul class="link-list" role="directory">
    <li><a href="#label-NEWS+for+Ruby+1.9.1">NEWS for Ruby 1.9.1</a>
    <li><a href="#label-Changes+since+the+1.8.7+release">Changes since the 1.8.7 release</a>
    <li><a href="#label-Compatibility+issues">Compatibility issues</a>
    <li><a href="#label-Language+core+changes">Language core changes</a>
    <li><a href="#label-Library+updates">Library updates</a>
    <li><a href="#label-Implementation+changes">Implementation changes</a>
  </ul>
</div>

  <button id='toggleThing' @click="toggleNav()" >Show/hide navigation</button>

  <div id="project-metadata">
   <div :class="isOpen ? 'block' : 'hidden' " id='toggleMe'>
    
<div id="fileindex-section" class="nav-section">
  <h3>Pages</h3>

  <ul class="link-list">
    <li><a href="../NEWS/NEWS-1_8_7.html">NEWS-1.8.7</a>
    <li><a href="../NEWS/NEWS-1_9_1.html">NEWS-1.9.1</a>
    <li><a href="../NEWS/NEWS-1_9_2.html">NEWS-1.9.2</a>
    <li><a href="../NEWS/NEWS-1_9_3.html">NEWS-1.9.3</a>
    <li><a href="../NEWS/NEWS-2_0_0.html">NEWS-2.0.0</a>
    <li><a href="../NEWS/NEWS-2_1_0.html">NEWS-2.1.0</a>
    <li><a href="../NEWS/NEWS-2_2_0.html">NEWS-2.2.0</a>
    <li><a href="../NEWS/NEWS-2_3_0.html">NEWS-2.3.0</a>
    <li><a href="../NEWS/NEWS-2_4_0.html">NEWS-2.4.0</a>
    <li><a href="../NEWS/NEWS-2_5_0.html">NEWS-2.5.0</a>
    <li><a href="../NEWS/NEWS-2_6_0.html">NEWS-2.6.0</a>
    <li><a href="../NEWS/NEWS-2_7_0.html">NEWS-2.7.0</a>
    <li><a href="../NEWS/NEWS-3_0_0_md.html">NEWS-3.0.0</a>
    <li><a href="../NEWS/NEWS-3_1_0_md.html">NEWS-3.1.0</a>
    <li><a href="../NEWS/NEWS-3_2_0_md.html">NEWS-3.2.0</a>
    <li><a href="../bsearch_rdoc.html">bsearch</a>
    <li><a href="../bug_triaging_rdoc.html">bug_triaging</a>
    <li><a href="../case_mapping_rdoc.html">case_mapping</a>
    <li><a href="../character_selectors_rdoc.html">character_selectors</a>
    <li><a href="../command_injection_rdoc.html">command_injection</a>
    <li><a href="../contributing_md.html">contributing</a>
    <li><a href="../contributing/building_ruby_md.html">building_ruby</a>
    <li><a href="../contributing/documentation_guide_md.html">documentation_guide</a>
    <li><a href="../contributing/glossary_md.html">glossary</a>
    <li><a href="../contributing/making_changes_to_ruby_md.html">making_changes_to_ruby</a>
    <li><a href="../contributing/making_changes_to_stdlibs_md.html">making_changes_to_stdlibs</a>
    <li><a href="../contributing/reporting_issues_md.html">reporting_issues</a>
    <li><a href="../contributing/testing_ruby_md.html">testing_ruby</a>
    <li><a href="../dig_methods_rdoc.html">dig_methods</a>
    <li><a href="../distribution_md.html">distribution</a>
    <li><a href="../dtrace_probes_rdoc.html">dtrace_probes</a>
    <li><a href="../encodings_rdoc.html">encodings</a>
    <li><a href="../extension_ja_rdoc.html">extension.ja</a>
    <li><a href="../extension_rdoc.html">extension</a>
    <li><a href="../fiber_md.html">fiber</a>
    <li><a href="../format_specifications_rdoc.html">format_specifications</a>
    <li><a href="../globals_rdoc.html">globals</a>
    <li><a href="../implicit_conversion_rdoc.html">implicit_conversion</a>
    <li><a href="../keywords_rdoc.html">keywords</a>
    <li><a href="../maintainers_md.html">maintainers</a>
    <li><a href="../marshal_rdoc.html">marshal</a>
    <li><a href="../memory_view_md.html">memory_view</a>
    <li><a href="../optparse/argument_converters_rdoc.html">argument_converters</a>
    <li><a href="../optparse/creates_option_rdoc.html">creates_option</a>
    <li><a href="../optparse/option_params_rdoc.html">option_params</a>
    <li><a href="../optparse/tutorial_rdoc.html">tutorial</a>
    <li><a href="../packed_data_rdoc.html">packed_data</a>
    <li><a href="../ractor_md.html">ractor</a>
    <li><a href="../regexp_rdoc.html">regexp</a>
    <li><a href="../regexp/methods_rdoc.html">methods</a>
    <li><a href="../regexp/unicode_properties_rdoc.html">unicode_properties</a>
    <li><a href="../ruby_3_3_0_preview2/COPYING.html">COPYING</a>
    <li><a href="../ruby_3_3_0_preview2/COPYING_ja.html">COPYING.ja</a>
    <li><a href="../ruby_3_3_0_preview2/LEGAL.html">LEGAL</a>
    <li><a href="../ruby_3_3_0_preview2/NEWS_md.html">NEWS</a>
    <li><a href="../ruby_3_3_0_preview2/README_ja_md.html">README.ja</a>
    <li><a href="../ruby_3_3_0_preview2/README_md.html">README</a>
    <li><a href="../security_rdoc.html">security</a>
    <li><a href="../signals_rdoc.html">signals</a>
    <li><a href="../standard_library_rdoc.html">standard_library</a>
    <li><a href="../strftime_formatting_rdoc.html">strftime_formatting</a>
    <li><a href="../syntax_rdoc.html">syntax</a>
    <li><a href="../syntax/assignment_rdoc.html">assignment</a>
    <li><a href="../syntax/calling_methods_rdoc.html">calling_methods</a>
    <li><a href="../syntax/comments_rdoc.html">comments</a>
    <li><a href="../syntax/control_expressions_rdoc.html">control_expressions</a>
    <li><a href="../syntax/exceptions_rdoc.html">exceptions</a>
    <li><a href="../syntax/literals_rdoc.html">literals</a>
    <li><a href="../syntax/methods_rdoc.html">methods</a>
    <li><a href="../syntax/miscellaneous_rdoc.html">miscellaneous</a>
    <li><a href="../syntax/modules_and_classes_rdoc.html">modules_and_classes</a>
    <li><a href="../syntax/pattern_matching_rdoc.html">pattern_matching</a>
    <li><a href="../syntax/precedence_rdoc.html">precedence</a>
    <li><a href="../syntax/refinements_rdoc.html">refinements</a>
    <li><a href="../timezones_rdoc.html">timezones</a>
    <li><a href="../windows_md.html">windows</a>
    <li><a href="../yjit/yjit_md.html">yjit</a>
    <li><a href="../yjit/yjit_hacking_md.html">yjit_hacking</a>
  </ul>
</div>

   </div>
  </div>
</nav>


<!--  carbon ads here -->

<div id='extraz'>
  <div class='adzbox-index'  >
   
  </div>
 </div>         


<main role="main" aria-label="Page NEWS/NEWS-1.9.1">

<h1 id="label-NEWS+for+Ruby+1.9.1"><a href="../ruby_3_3_0_preview2/NEWS_md.html">NEWS</a> for Ruby 1.9.1<span><a href="#label-NEWS+for+Ruby+1.9.1">&para;</a> <a href="#top">&uarr;</a></span></h1>

<p>This document is a list of user visible feature changes made between releases except for bug fixes.</p>

<p>Note that each entry is kept so brief that no reason behind or reference information is supplied with.  For a full list of changes with all sufficient information, see the ChangeLog file.</p>

<h2 id="label-Changes+since+the+1.8.7+release">Changes since the 1.8.7 release<span><a href="#label-Changes+since+the+1.8.7+release">&para;</a> <a href="#top">&uarr;</a></span></h2>

<p>See doc/NEWS-1.8.7 for changes between 1.8.6 and 1.8.7.</p>

<h3 id="label-Compatibility+issues">Compatibility issues<span><a href="#label-Compatibility+issues">&para;</a> <a href="#top">&uarr;</a></span></h3>
<ul><li>
<p>language core</p>

<pre>* New syntax and semantics
      o Block arguments are always local
      o New semantics for block arguments
      o defined? and local variables
      o Parser expects that your source code has only valid byte
        sequence in some character encoding.  Use magic comments
        to tell the parser which encoding you use.
      o New semantics for constant definition in instance_eval
        or in module_eval.

* Deprecated syntax
      o colon (:) instead of &quot;then&quot; in if/unless or case expression.
      o retry in a loop or an iterator.</pre>
</li><li>
<p>builtin classes and objects</p>

<pre>* Kernel and Object
      o Kernel#methods and #singleton_methods used to return an
        array of strings but now they return an array of symbols.
* Class and Module
      o Module#attr works as Module#attr_reader by default.
        Optional boolean argument is obsolete.
      o Module#instance_methods, #private_instance_methods and
        #public_instance_methods used to return an array of
        strings but now they return an array of symbols.
      o Extra subclassing check when binding UnboundMethods

* Exceptions
      o Exceptions are equal to each other if they belong to
        the same class and have the same message and backtrace.
      o SystemStackError used to be a subclass of StandardError
        but not it is a direct subclass of Exception.
      o SecurityError: ditto
      o Removed Exception#to_str [Ruby2]

* Enumerable and Enumerator
      o Enumerable::Enumerator, compatibility alias of Enumerator,
        is removed.
      o Enumerable#{map,collect} called without a block returns
        an enumerator.
      o Even more builtin and bundled libraries have been made to
        return an enumerator when called without a block.
* Array
      o Array#nitems was removed (use count {|i| !i.nil?})
      o Array#choice was removed (use sample)
      o Array#[m,n] = nil places nil in the array.
* Hash
      o Hash#to_s is equivalent to Hash#inspect
      o Semantics for Hash#each and Hash#each_pair
      o Hash#select returns a hash
      o Hash#key is the new name for #index which has been
        deprecated.
      o Hash preserves order.  It enumerates its elements in the
        order in which the keys are inserted.
      o Most of the changes in Hash apply to hash like interfaces
        such as ENV and *DBM.
* IO operations
      o Many methods used to act byte-wise but now some of those act
        character-wise. You can use alternate byte-wise methods.
      o IO#getc
      o Non-blocking IO
      o Kernel#open takes &quot;t&quot; for newline conversion
      o Kernel#open takes encoding specified
      o IO automatically converts byte sequence from a character
        encodings into another if specified.
      o StringIO#readpartial
      o IO.try_convert
      o IO.binread
      o IO.copy_stream
      o IO#binmode?
      o IO#close_on_exec= and IO#close_on_exec?
      o Limit input in IO#gets, IO#readline, IO#readlines,
        IO#each_line, IO#lines, IO.foreach, IO.readlines,
        StringIO#gets, StringIO#readline, StringIO#each,
        StringIO#readlines
      o IO#ungetc, StringIO#ungetc
      o IO#ungetbyte, StringIO#ungetbyte
      o IO#internal_encoding, IO#external_encoding,
        IO#set_encoding
      o IO.pipe takes encoding option
      o Directive %u behaves like %d for negative values in
        printf-style formatting.
* File and Dir operations
      o #to_path is called as necessary in File.path, File.chmod,
        File.lchmod, File.chown, File.lchown, File.utime,
        File.unlink, etc..
      o File.world_readable?
      o File.world_writable?
      o Dir.[], Dir.glob
      o Dir.exist?
      o Dir.exists?
* File::Stat
      o File::Stat#world_readable?
      o File::Stat#world_writable?
* String
      o No longer an Enumerable: use each_line/lines for line
        oriented operation
      o Encoding-awareness
          o Character-wise semantics in many methods instead of
            byte-wise.
              o String#[]: Indexing a String with an integer returns a
                single character String instead of an integer.
              o String#[]=: No longer takes an integer as right
                side value.  Note that &quot;str[i] = ?c&quot; because of
                the following change.
              o ?c is evaluated to a single character string
                instead of an integer.
* Regexp
      o Encoding-awareness
      o Regexp matches only with strings which is encoded in a
        compatible character encoding to the regexp&#39;s.
      o Regexp#kcode is removed. use Regexp#encoding.
* Symbols: restriction on literal symbols
* Numeric
      o Numeric#div always rounds as Integer#div has done.
      o Numeric#fdiv: ditto.
* Integer
      o Integer(nil) raises TypeError
* Fixnum
      o Fixnum#id2name removed
      o Fixnum#to_sym removed
* Struct
      o Struct#inspect
* Time
      o New format in Time#to_s
      o Timezone information preserved on Marshal.dump/load
* $SAFE and bound methods
      o New trusted/untrusted model in addition to
        tainted/untainted model.

* Deprecation
      o $= (global flag for case-sensitiveness on string matching)
      o Kernel#to_a
      o Kernel#getc, #gsub, #sub
      o Kernel#callcc and Continuation now become &#39;continuation&#39;
        bundled library.
      o Object#type
      o Removed Array and Hash #indices, #indexes
      o Hash#index
      o ENV.index
      o Process::Status#to_int
      o Numeric#rdiv
      o Precision is removed.  Don&#39;t cry, it will be redesigned
        and come back in future version.
      o Symbol#to_int and Symbol#to_i
      o $KCODE is no longer effective.  Use Encoding related
        features of each class.
      o VERSION and friends</pre>
</li><li>
<p>bundled libraries</p>

<pre>* Pathname
      o No longer has #to_str nor #=~.
* time and date
      o Time.parse and Date.parse interprets slashed numerical dates
        as &quot;dd/mm/yyyy&quot;.
* Readline
      o If Readline uses libedit, Readline::HISTORY[0] returns the
        first of the history.
* Continuation
      o as above

* Deprecation
      o Complex#image: use Complex#imag
      o All SSL-related class methods in Net::SMTP
      o Prime#cache, Prime#primes, Prime#primes_so_far
      o mailread library: use tmail gem.
      o cgi-lib library: use cgi.
      o date2 library: use date.
      o eregex library
      o finalize library: use ObjectSpace.define_finalizer if you
        really need a finalizer. really?
      o ftools library: use fileutils.
      o generator library: use Enumerator.
      o importenv library and Env library
      o jcode library: use multilingualization support of String
      o parsedate library
      o ping library
      o readbytes library
      o getopts library and parsearg library: use optparse or
        getoptlong.
      o soap, wsdl and xsd libraries: use soap4r gem.
      o Win32API library: use dl.
      o dl library: Reimplemented and API changed. use the new
        version of dl or ffi gem.
      o rubyunit library and runit library: use minitest or
        test/unit. Or use anything you love through RubyGems.
      o test/unit is reimplemented on top of minitest.  This is
        not fully compatible with the original.</pre>
</li></ul>

<h3 id="label-Language+core+changes">Language core changes<span><a href="#label-Language+core+changes">&para;</a> <a href="#top">&uarr;</a></span></h3>

<pre>* New syntax and semantics
      o Magic comments to declare in which encoding your source
        code is written
      o New literal hash syntax and new syntax for hash style
        arguments
      o New syntax for lambdas
      o .() and calling Procs without #call/#[]
      o Block in block arguments
      o Block local variables
      o Mandatory arguments after optional arguments allowed
      o Multiple splats allowed
      o #[] can take splatted arguments, hash style arguments
        and a block.
      o New directives in printf-style formatted strings (%).
      o Newlines allowed before ternary colon operator (:) and
        method call dot operator (.)
      o Negative operators such as !, != and !~ are now
        overloadable
      o Encoding.default_external and default_internal
      o __ENCODING__: New pseudo variable to hold the current
        script&#39;s encoding</pre>

<h3 id="label-Library+updates">Library updates<span><a href="#label-Library+updates">&para;</a> <a href="#top">&uarr;</a></span></h3>
<ul><li>
<p>builtin classes and objects</p>

<pre>* Kernel and Object
      o BasicObject
      o Object#=~ returns nil instead of false by default.
      o Kernel#define_singleton_method
      o Kernel#load can load a library from the highest versions
        of gems by default.
* Class and Module
      o Module#const_defined?, #const_get and #method_defined?
        take an optional parameter.
      o #class_variable_{set,get} are public.
      o Class of singleton classes

* Errno::EXXX
      o All of those are always defined.  Errno::EXXX will be
        defined as an alias to Errno::NOERROR if your platform
        does not have one.

* Binding#eval
* Blocks and Procs
      o Arity of blocks without arguments
      o proc is now a synonym of Proc.new
      o Proc#yield
      o Passing blocks to #[]
      o Proc#lambda?
      o Proc#curry
* Fiber: coroutines/micro-threads
* Thread
      o Thread.critical and Thread.critical= removed
      o Thread#exit!, Thread#kill! and Thread#terminate! removed.

* Enumerable and Enumerator
      o Enumerator#enum_cons and Enumerator#enum_slice are
        removed.  Use #each_cons and #each_slice without a block.
      o Enumerable#each_with_index can take optional arguments
        and passes them to #each.
      o Enumerable#each_with_object
      o Enumerator#with_object
      o Enumerator.new { ... }
* Array
      o Array#delete returns a deleted element rather than a given
        object
      o Array#to_s is equivalent to Array#inspect
      o Array.try_convert
      o Array#pack(&#39;m0&#39;) complies with RFC 4648.
* Hash
      o preserving item insertion order
      o Hash#default_proc=
      o Hash#_compare_by_identity and Hash#compare_by_identity?
      o Hash.try_convert
      o Hash#assoc
      o Hash#rassoc
      o Hash#flatten
* Range
      o Range#cover?
      o Range#include? iterates over elements and compares the
        given value with each element unless the range is numeric.
        Use Range#cover? for the old behavior, i.e. comparison
        with boundary values.
      o Range#min, Range#max

* File and Dir operations
      o New methods
* Process
      o Process.spawn
      o Process.daemon
* String
      o String#clear
      o String#ord
      o String#getbyte, String#setbyte
      o String#chars and String#each_char act as character-wise.
      o String#codepoints, String#each_codepoint
      o String#unpack with a block
      o String#hash
      o String.try_convert
      o String#encoding
      o String#force_encoding, String#encode and String#encode!
      o String#ascii_only?
      o String#valid_encoding?
      o String#match
* Symbol
      o Zero-length symbols allowed
      o Symbol#intern
      o Symbol#encoding
      o Symbol methods similar to those in String
* Regexp
      o Regexp#=== matches symbols
      o Regexp.try_convert
      o Regexp#match
      o Regexp#fixed_encoding?
      o Regexp#encoding
      o Regexp#named_captures
      o Regexp#names
* MatchData
      o MatchData#names
      o MatchData#regexp
* Encoding
* Encoding::Converter
      o supports conversion between many encodings
* Numeric
      o Numeric#upto, #downto, #times, #step
      o Numeric#real?, Complex#real?
      o Numeric#magnitude
      o Numeric#round
* Float
      o Float#round
* Integer
      o Integer#round
* Rational / Complex
      o They are in the core library now
* Math
      o Math#log takes an optional argument.
      o Math#log2
      o Math#cbrt, Math#lgamma, Math#gamma
* Time
      o Time.times removed.  Use Process.times.
      o Time#sunday?
      o Time#monday?
      o Time#tuesday?
      o Time#wednesday?
      o Time#thursday?
      o Time#friday?
      o Time#saturday?
      o Time#tv_nsec and Time#nsec
* Misc. new methods
      o RUBY_ENGINE to distinguish between Ruby processor implementation
      o public_method
      o public_send
      o GC.count
      o ObjectSpace.count_objects
      o Method#hash, Proc#hash
      o Method#source_location, UnboundMethod#source_location and
        Proc#source_location
      o __callee__
      o Elements in $LOAD_PATH and $LOADED_FEATURES are expanded</pre>
</li><li>
<p>bundled libraries</p>

<pre>* RubyGems
      o Package management system for Ruby.
      o Integrated with Ruby&#39;s library loader.
* Rake
      o Ruby make. A simple ruby build program with capabilities
        similar to make.
* minitest
      o Our new testing library which is faster, cleaner and easier
        to read than the old test/unit.
      o You can introduce the old test/unit as testunit gem through
        RubyGems if you want.
* CMath
      o Complex number version of Math
* Prime
      o Extracted from Mathn and improved. You can easily enumerate
        prime numbers.
      o Prime.new is obsolete. Use its class methods.
* ripper
      o Ruby script parser
* Readline
      o Readline.vi_editing_mode?
      o Readline.emacs_editing_mode?
      o Readline::HISTORY.clear
* Tk
      o TkXXX widget classes are removed and redefined as aliases of
        Tk::XXX classes.
* RDoc
      o Updated to version 2.2.2.  See:
        http://rubyforge.org/frs/shownotes.php?group_id=627&amp;release_id=26434
* json
      o JSON (JavaScript Object Notation) encoder/decoder</pre>
</li><li>
<p>commandline options</p>

<pre>* -E, --encoding
* -U
* --enable-gems, --disable-gems
* --enable-rubyopt, --disable-rubyopt
* long options are allowed in RUBYOPT environment variable.</pre>
</li></ul>

<h3 id="label-Implementation+changes">Implementation changes<span><a href="#label-Implementation+changes">&para;</a> <a href="#top">&uarr;</a></span></h3>
<ul><li>
<p>Memory Diet</p>

<pre>* Object Compaction - Object, Array, String, Hash, Struct, Class,
  Module
* st_table compaction (inlining small tables)</pre>
</li><li>
<p>YARV</p>

<pre>* Ruby codes are compiled into opcodes before executed.
* Native thread</pre>
</li><li>
<p>Platform supports</p>

<pre>* Support levels
      (0) Supported
      (1) Best effort
      (2) Perhaps
      (3) Not supported
* Dropped
      o No longer supports djgpp, bcc32, human68k, MacOS 9 or earlier,
        VMS nor Windows CE.</pre>
</li></ul>

</main>

</div>  <!--  class='wrapper hdiv' -->


<footer id="validator-badges" role="contentinfo">
<p><a href="https://validator.w3.org/check/referer">Validate</a></p>
<p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.4.0.</p>
<p>Based on <a href="https://github.com/ged/darkfish/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.</p>

  
    <p><p><a href="https://ruby-doc.org">Ruby-doc.org</a> is provided by <a href="https://jamesbritt.com">James Britt</a> and <a href="https://neurogami.com">Neurogami</a>.</p><p><a href="https://jamesbritt.bandcamp.com/">Maximum R+D</a>.  </p>
</p>
  
  </footer>

<script type="text/javascript">


  let ads  = $("#carbonads-container").children().detach();


  function swapMode() {
    var cookieName = 'darkmode';
    var cssDarkmode = Cookies.get(cookieName);
    console.log("***** swapMode! " + cssDarkmode + " *****");


    if (cssDarkmode == "true") {
      console.log("We have dark mode, set the css to light ...");
      $('#rdoccss').attr("href", defaultModeCssHref);
      $('#cssSelect').text("Dark mode");
      cssDarkmode = "false";
      console.log("swapMode! Now set cookie to " + cssDarkmode);
      Cookies.set(cookieName, cssDarkmode);

    } else {
      console.log("We not have dark mode, set the css to dark ...");
      $('#rdoccss').attr("href", darkModeCsseHref);
      $('#cssSelect').text("Light mode");
      cssDarkmode = "true";
      console.log("swapMode! Now set cookie to " + cssDarkmode);
      Cookies.set(cookieName, cssDarkmode);

    }

    console.log("  --------------- ");
  }


const vueCssApp = new Vue({
el: '#menubar',
data: {
isDark: false
},
methods: {
toggleClass: function(event){
this.isDark = !this.isDark;
}
}
})

const vueApp = new Vue({
el: '#vapp',
data: { 
isOpen: true
},

mounted() {
this.handleResize();
this.manage_mob_classes();
window.addEventListener('resize', this.handleResize)
//this.isOpen !=  (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent));
},
destroyed() {
window.removeEventListener('resize', this.handleResize)
},
created() {
//manage_mob_classes();
},

methods : {
isMobile() {
  return (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent));
},

  handleResize() {
    if (!this.isMobile()) {
      this.isOpen = window.innerWidth > 800;
    }
  },

  manage_mob_classes() {
    if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) {
      $("nav").addClass("mob_nav");
      $("main").addClass("mob_main");
      $("#extraz").addClass("mob_extraz");
      $("#carbonads-container").addClass("mob_carbonads-container");
      this.isOpen  = false;
    } else {
      $("nav").removeClass("mob_nav") 
        $("main").removeClass("mob_main");
      $("#extraz").removeClass("mob_extraz");
      $("#carbonads-container").removeClass("mob_carbonads-container");
      this.isOpen  = true;
    }
  },

  toggleNav() {
    this.isOpen =! this.isOpen ;
    // alert("Toggle nav!");
    console.log("toggleNav() click: " + this.isOpen );
  }
}
})

$("#carbonads-container").append(ads);


$(function() {

    var darkmode = Cookies.get("darkmode");
    console.log("Document ready: " + darkmode);

    if ( darkmode  == "true" ) {
      $('#cssSelect').text("Light mode");
    } else {
      $('#cssSelect').text("Dark mode");
     }

    $('body').css('display','block');
    });

</script>

    
  </body> 
</html>

